package com.matt.sooncleaner.notification

import android.service.notification.NotificationListenerService
import android.service.notification.StatusBarNotification

/**
 *
 * Created by xiexiang10 on 2024/6/17.
 **/
class AppNotificationService: NotificationListenerService() {
    override fun onNotificationPosted(sbn: StatusBarNotification?) {
        super.onNotificationPosted(sbn)
        val packageName = sbn?.packageName?:return
        if (NotificationHelper.isEnableBlock(packageName)) {
            cancelNotification(sbn.key)
        }
    }
}